KISSY.use('gallery/random-show/1.0/random-show,extends/ajax/ajax,dom,node,sizzle',function(S, RandomShow,Ajax,dom,node,sizzle){
	 var $ = S.all ;
	 $(".article_type_nav").on("click",function(){
		 $(".article_type_nav").removeClass("selected");
		 $(this).addClass("selected");
		 var param = {
				 articleTypeId :  $(this).attr("typeId")
		 }
		 new Ajax($("#page_context_path").val()+"/page/article/ajax/query.jspx",param,function(data){
			$(".brandshow").html(data);
		 },{async:false});
		 var rs = new RandomShow('.brandshow');
	     rs.run();
	     bindSpanClick($);
	 });
	 $(".article_type_nav")[0].click();
 });

//给span绑定事件
function bindSpanClick($){
	$(".brandshow>span").on("click",function(){
		var url = $("#page_context_path").val()+"/page/article/articlePage.jspx?articleId="+$(this).attr("articleId");
		window.open(url);
	 })
}
